let user = {
    name: "John",
    age: 30,
};


Object.assign(user,{name:"pete"});

alert(user.name);


let clone = Object.assign({}, user);

alert(clone.name + ' ' +  clone.age);